import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import BasicLayout from '../layouts/BasicLayout.vue'

export default class RouterConfig {
    public getRouter(): Array<RouteRecordRaw> {
        let re: Array<RouteRecordRaw> = [
            {
                path: '/',
                name: 'dashboard',
                component: BasicLayout,
                meta: { title: '首页',icon:"home" },
                redirect: '/dashboard',
                children: [
                    {
                        path: '/dashboard',
                        name: 'dashboard',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '首页' }
                    }]
            },
            {
                path: '/label',
                name: 'label',
                component: BasicLayout,
                meta: { title: '标签库',icon:"label" },
                redirect: '/label',
                children: [
                    {
                        path: '/label',
                        name: 'label',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '首页' }
                    }]
            },
            {
                path: '/record',
                name: 'record',
                component: BasicLayout,
                meta: { title: '行为记录',icon:"record" },
                redirect: '/record',
                children: [
                    {
                        path: '/record',
                        name: 'record',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '首页' }
                    }]
            },
            {
                path: '/notes',
                name: 'notes',
                component: BasicLayout,
                meta: { title: '执行记划',icon:"notes" },
                redirect: '/notes',
                children: [
                    {
                        path: '/notes',
                        name: 'notes',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '首页' }
                    }]
            },
            {
                path: '/auditing',
                name: 'auditing',
                component: BasicLayout,
                meta: { title: '标签审核',icon:"auditing" },
                redirect: '/auditing',
                children: [
                    {
                        path: '/auditing',
                        name: 'auditing',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '首页' }
                    }]
            },
            {
                path: '/from',
                name: 'from',
                component: BasicLayout,
                meta: { title: '表单',icon:"from" },
                redirect: '/from/base',
                children: [
                    {
                        path: '/from/base',
                        name: 'base',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '基础表单' }
                    },
                    {
                        path: '/from/senior',
                        name: 'senior',
                        component: () => import('@/views/Home.vue'),
                        meta: { title: '高级表单' }
                    }
                ]
            }
        ];
        return re;
    }
}